package com.tian.enums;

import lombok.Getter;

/**
 * {@code @description:} TODO
 *
 * @author tianwc 公众号：Java后端技术全栈
 * 在线刷题 1200+java面试题和1000+篇技术文章：<a href="https://woaijava.cc/">博客地址</a>
 * {@code @date:} 2025-03-05 21:50
 * {@code @version:} 1.0
 */
@Getter
public enum ChargingStationStatusEnum {
    //建设中
    BUILDING(0, "建设中"),
    //运营中
    OPERATING(1, "运营中"),
    //停运
    STOPPING(2, "停运"),
    //维修
    REPAIRING(3, "维修");

    private final int status;
    private final String desc;
    ChargingStationStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static String getDesc(Integer status) {
        for (ChargingStationStatusEnum e : ChargingStationStatusEnum.values()) {
            if (e.getStatus() == status) {
                return e.getDesc();
            }
        }
        return null;
    }
}
